/*
 * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package cn.matezk.dms.things.model.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import top.continew.starter.extension.crud.model.req.BaseReq;

import java.io.Serial;
import java.util.List;

/**
 * 创建FOTA任务
 *
 * @author 程道林
 * @since 2025/09/25 20:24
 */
@Data
@Schema(description = "创建或修改固件包")
public class FotaTaskReq extends BaseReq {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 固件ID
     */
    @Schema(description = "固件ID")
    @NotNull(message = "固件ID不能为空")
    private Long pkgId;

    /**
     * 待升级版本
     */
    @Schema(description = "待升级版本")
    private String oldVersion;

    /**
     * 升级范围
     */
    @Schema(description = "升级范围")
    @NotBlank(message = "升级范围不能为空")
    private String scope;

    /**
     * 升级确认
     */
    @Schema(description = "升级确认")
    private String confirm;

    /**
     * 超时时长配置
     */
    @Schema(description = "超时时长配置")
    private String timeout;

    /**
     * 待升级设备名称
     */
    @Schema(description = "待升级设备名称")
    private List<String> deviceList;
}